<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.springframework.org/schema/jdbc">

<head>
    <meta charset="utf-8">
    <title>个人资料</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <link rel="stylesheet" th:href="@{/managerstatic/plugins/layui/css/layui.css}" media="all" />
</head>

<body>
<script th:src="@{/managerstatic/plugins/jquery.min.js}"></script>
<script th:src="@{/managerstatic/js/javascript.util.js}"></script>
<script th:src="@{/managerstatic/js/jquery.util.js}"></script>
<script th:src="@{/managerstatic/js/dataCache.js}"></script>
<script th:src="@{/managerstatic/plugins/layui/layui.js}"></script>
<script>
    layui.use(['laytpl'], function () {
        var laytpl = layui.laytpl;

        var obj = {
            type: 'get'
            , url: "/cinemaAdmin/findUser"
            , data: '%7b%7d'
            , dataType: 'json'
            , success: function (result) {
                if (result.code === 200) {
                    var getTpl = demo.innerHTML
                        , view = document.getElementById('view');
                    laytpl(getTpl).render(result.data[0], function (html) {
                        view.innerHTML = html;
                    });
                } else {
                    layer.msg('获取用户信息失败。');
                    console.warn(result.msg);
                }
            }
            , error: function (ex) {
                console.warn(ex.responseText);
            }
        };

        //判断是否在服务器环境中，是则用本地数据。
        if (getIsWeb() === false) {
            var data = getJson_getUserInfo();
            obj.success(data);
        } else {
            //jquery ajax请求
            jqueryAjax(obj);
        }
    });
</script>

<div id="view"></div>

<script id="demo" type="text/html">
    <fieldset class="layui-elem-field layui-field-title">
        <legend>账户信息</legend>
    </fieldset>
    <table class="layui-table">
        <colgroup>
            <col width="100">
            <col>
            <col width="100">
            <col>
        </colgroup>
        <thead style="display:none" hidden="hidden">
        <tr>
            <th>1</th>
            <th>2</th>
            <th>3</th>
            <th>4</th>
        </tr>
        </thead>
        <tbody>
        <tr>
            <td><strong>用户账号:</strong></td>
            <td>{{d.account}}</td>
        </tr>
        <tr>
            <td><strong>密码:</strong></td>
            <td>{{d.password}}</td>
        </tr>
        </tbody>
    </table>


</script>
</body>

</html>